server {
    listen [::]:80;
    listen 80;
    server_name jira.lineageos.org;
    location /.well-known/ {
        alias /var/www/jira.lineageos.org/.well-known/;
    }
    location / {
        rewrite     ^   https://$server_name$request_uri? permanent;
    }
}

server {
    listen [::]:443 ssl;
    listen 443 ssl;
    server_name jira.lineageos.org;

    ssl_certificate /etc/letsencrypt/live/jira.lineageos.org/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/jira.lineageos.org/privkey.pem;


    location / {
        proxy_set_header Host $host:$server_port;
        proxy_set_header        X-Real-IP $remote_addr;
        proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header        X-Forwarded-Proto $scheme;

        proxy_pass          http://127.0.0.1:8080;
        proxy_read_timeout  90;
        client_max_body_size       10m;
        client_body_buffer_size    128k;
      }

}

